@import "nib"
@import "_variables"
@import "_util/mixin"
@import "_util/grid"

global-reset()

input, button
  margin: 0
  padding: 0
  &::-moz-focus-inner
    border: 0
    padding: 0

@font-face
  font-family: FontAwesome
  font-style: normal
  font-weight: normal
  src: url(font-icon-path + ".eot?v=#" + font-icon-version)
  src: url(font-icon-path + ".eot?#iefix&v=#" + font-icon-version) format("embedded-opentype"),
       url(font-icon-path + ".woff?v=#" + font-icon-version) format("woff"),
       url(font-icon-path + ".ttf?v=#" + font-icon-version) format("truetype"),
       url(font-icon-path + ".svg#fontawesomeregular?v=#" + font-icon-version) format("svg")

html, body, #container
  height: 100%

body
  background: color-background
  -webkit-text-size-adjust: 100%
  font: 14px "Titillium Web", "Helvetica Neue", Helvetica, Arial, "Microsoft Yahei", sans-serif

.outer
  clearfix()
  max-width: (column-width + gutter-width) * columns + gutter-width
  margin: 0 auto
  padding: 0 gutter-width

.inner
  column(columns)

.left, .alignleft
  float: left

.right, .alignright
  float: right

.clear
  clear: both

#container
  position: relative

.mobile-nav-on
  overflow: hidden

#wrap
  height: 100%
  width: 100%
  position: absolute
  top: 0
  left: 0
  transition: 0.2s ease-out
  z-index: 1
  background: color-background
  .mobile-nav-on &
    left: mobile-nav-width
#toc
  position: absolute
  left: 30px
  margin-top: 50px
  .toc-title
    padding: 0 0 10px 20px
    font-size: 15px
    font-weight: 600
    color: #727272
  .toc-item
    position: relative
    z-index: 2
    display: block
    line-height: 1.3rem 
    padding: 3px 20px
    color: inherit
    word-break: break-all
    &.active > .toc-link
      font-weight: 600
      color: #3f51b5
      background-color: #dddddd
      border-left: 3px solid #3f51b5
  .toc-link
    padding: 4px 10px
    display: block
    background-color: transparent
    background-image: none
    color: #727272
    text-decoration: none
    outline: 0
    &:hover
      color: #3f51b5
      text-decoration: underline
    
#toc.fixed
  position: fixed
  top: 0

if sidebar and sidebar isnt bottom
  #main
    @media mq-normal
      column(main-column)

if sidebar is left
  @media mq-normal
    #main
      float: right

@import "_extend"
@import "_partial/header"
@import "_partial/insight"
@import "_partial/article"
@import "_partial/comment"
@import "_partial/archive"
@import "_partial/footer"
@import "_partial/highlight"
@import "_partial/mobile"
@import "_partial/totop"

if sidebar
  @import "_partial/sidebar"

.article-statement
  font-size 0.85em
  line-height 1.6em
  margin 0.5em 0
  text-shadow: 0 1px #fff
  color #999
  a
    &:hover
      text-decoration none
